import requests
import json

headers = {
   "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62"
}
url = "https://fanyi.baidu.com/sug"

kw  = input("请输入你要翻译的单词：")

params = {
   "kw":kw
}
response = requests.post(url,headers=headers,params=params)
ret = response.text
dict_data = json.loads(ret)
ret2 = dict_data["data"][0]["v"]
print(ret2)